﻿Create PROCEDURE [dbo].[proc_Customer_Auditlog_GetListCount]
	(
	@username nvarchar(50),
	@StartDate nvarchar(50),
	@EndDate nvarchar(50),
	@SText nvarchar(50)
	)

AS
	Select Count(Id) From Customer_AuditLog 
	where
		 SalesName=@Username
		 and (Convert(varchar(10),AuditDate,120)>=@StartDate and Convert(varchar(10),AuditDate,120)<=@EndDate)
		 and (@SText='' or CustomerName like '%'+@SText+'%') 
	RETURN
